1. Technical Field
The present invention is directed generally toward a method and computer instruction for timeout handling. Specifically it is a polling based mechanism for handing timeouts in a standard RPC connection.
2. Description of the Related Art
A procedure is a software routine that runs in a computer. A procedure call is a request by one procedure to another procedure for some service. This is relatively simple when both procedures are running in the same computer. A remote procedure call (“RPC”) is a request made by a process in one computer to another computer across a network. RPCs tend to operate in real time because the calling program usually waits until it receives a response from the called program. RPCs are required in applications in which a procedure should not continue until it receives the information it needs from the remote system. RPC protocol limits a given connection to allow at most one pending RPC interaction at a time, but may have concurring requests.
Sun Microsystems popularized the technique with its SunsSoft's Open Network Computing (ONC) remote procedure calls. According to ONC RPC, the client establishes a simple “maximum wait time” value when waiting for the reply message associated with an RPC request to a server system. If the reply does not arrive within the allotted time, the underlying RPC implementation will indicate that a failure occurred, and the client will be forced to take application-specific corrective action. This approach has been applied in which the RPC requests submitted by a client can be handled quickly (e.g. on the order of several seconds or less) by the server system. In such cases, a reasonable timeout value, such as 30 seconds, provides ample time for the reply message to traverse the network between the server and the client. If a reply does not arrive within this time window, it is fairly safe for the client to assume that a network problem exists, or that the server system has crashed. In either case, it is appropriate for the client to take some form of corrective action, which might include terminating the client application, or at least informing the end-user that an operation failed due to a server or network problem.
The approach does not work nearly so well in cases where the requested operation may require lengthy processing by the sever system. An example of such a situation is when the RPC server is managing physical devices at the request of the RPC client. Therefore, it would be advantageous to have an improved method for polling RPCs.